package com.level2app.ui.account;

import android.view.View;

import com.level2app.R;
import com.level2app.base.BaseActivity;
import com.level2app.base.BaseViewModel;
import com.level2app.databinding.ActivityAccountDetailsBinding;
import com.level2app.utils.JumpIntent;
import com.level2app.view.dialog.ChooseHeadDialog;

public class AccountDetailsActivity extends BaseActivity<ActivityAccountDetailsBinding, BaseViewModel> {

    @Override
    protected BaseViewModel bindModel() {
        return getViewModel(this, BaseViewModel.class);
    }

    @Override
    protected void initInject() {
        getActivityComponent().inject(this);
    }

    @Override
    protected void initData() {
        initTitleBar(getString(R.string.account_details));
    }

    @Override
    protected void initClick() {
        viewModel.onDelayClick(binding.photoIv, o -> {
            ChooseHeadDialog chooseHeadDialog = new ChooseHeadDialog(context) {
                @Override
                public void takePhoto() {

                }

                @Override
                public void choosePhoto() {

                }
            };
            chooseHeadDialog.show();
        });
        viewModel.onDelayClick(binding.nameIv, o -> {
            binding.nameEt.setEnabled(true);
            binding.nameIv.setVisibility(View.GONE);
            binding.nameLl.setBackgroundResource(R.drawable.shape_stroke_000000_99dp);
        });
    }
}